From 50b9bdf83b35242f3c5170ac823791f3102bff1f Mon Sep 17 00:00:00 2001 From: Matthew Daley Date: Wed, 30 Oct 2013 20:51:57 +1300 Subject: [PATCH] xl: remove needless infinite-loop construct in create_domain Use a simple if condition instead. Coverity-ID: 1056150 Signed-off-by: Matthew Daley Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- tools/libxl/xl_cmdimpl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index a935a18cb4..d8f9abaa16 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -2144,9 +2144,8 @@ start: child1 = xl_fork(child_waitdaemon); if (child1) { - for (;;) { - got_child = xl_waitpid(child_waitdaemon, &status, 0); - if (got_child == child1) break; + got_child = xl_waitpid(child_waitdaemon, &status, 0); + if (got_child != child1) { assert(got_child == -1); perror("failed to wait for daemonizing child"); ret = ERROR_FAIL; -- 2.30.2